# 2024-11-07 10:25:23 by RouterOS 7.13.5
# software id = 
#
/interface bridge
add name=loopback protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] name=ether1-internet
set [ find default-name=ether2 ] name=ether2-claro
set [ find default-name=ether3 ] name=ether3-cpe_cliente
set [ find default-name=ether4 ] name=ether4-cliente-goias_tech
/interface vlan
add interface=ether3-cpe_cliente name=ether3_vlan200-cpe_cliente vlan-id=200
/ip pool
add name=dhcp_pool0 ranges=200.10.3.10
add name=pool-ips_cgnat-pppoe ranges=100.64.1.2-100.64.1.254
add name=pool-ips_publicos-pppoe ranges=200.10.1.2-200.10.1.254
add name=pool-ips_cgnat-dhcp ranges=100.64.2.2-100.64.2.254
add name=pool-ips_publicos-dhcp ranges=200.10.2.2-200.10.2.254
/ip dhcp-server
add address-pool=dhcp_pool0 interface=ether4-cliente-goias_tech lease-time=\
    1w3d name=dhcp1
add address-pool=pool-ips_cgnat-dhcp interface=ether3-cpe_cliente lease-time=\
    1m name=dhcp2
/port
set 0 name=serial0
/ppp profile
add dns-server=8.8.8.8,1.1.1.1 local-address=100.64.1.1 name=\
    profile-ips_cgnat remote-address=pool-ips_cgnat-pppoe
add dns-server=8.8.8.8,1.1.1.1 local-address=200.10.1.1 name=\
    profile-ips_publicos remote-address=pool-ips_publicos-pppoe
/interface pppoe-server server
add disabled=no interface=ether3-cpe_cliente service-name=service1
/ip address
add address=200.10.3.9/30 interface=ether4-cliente-goias_tech network=\
    200.10.3.8
add address=100.64.2.1/24 comment="IP CGNAT PARA DHCP" interface=\
    ether3-cpe_cliente network=100.64.2.0
add address=200.10.2.1/24 comment="IP PUBLICO PARA DHCP" interface=\
    ether3-cpe_cliente network=200.10.2.0
add address=200.10.3.1/30 comment="IP FIXO PARA CLIENTE - SEM VLAN" \
    interface=ether3-cpe_cliente network=200.10.3.0
add address=200.10.3.5/30 comment="IP FIXO PARA CLIENTE - COM VLAN" \
    interface=ether3_vlan200-cpe_cliente network=200.10.3.4
add address=100.100.100.1/30 interface=ether2-claro network=100.100.100.0
add address=200.10.3.254 interface=loopback network=200.10.3.254
/ip dhcp-client
add interface=ether1-internet
/ip dhcp-server network
add address=100.64.2.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=100.64.2.1
add address=200.10.2.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=200.10.2.1
add address=200.10.3.8/30 dns-server=8.8.8.8,1.1.1.1 gateway=200.10.3.9
/ip firewall address-list
add address=200.10.0.0/22 list=redes-bgp
/ip firewall filter
add action=drop chain=forward comment="BLOQUEIA ACESSO A REDE DE CGNAT" \
    connection-state=new dst-address=100.64.0.0/10
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1-internet
/ip route
add blackhole disabled=no dst-address=200.10.0.0/22 gateway="" routing-table=\
    main suppress-hw-offload=no
/ppp secret
add name=cgnat profile=profile-ips_cgnat password=123
add name=publico profile=profile-ips_publicos password=123
/routing bgp connection
add as=20011 disabled=no local.role=ebgp name=CLARO-V4 \
    output.default-originate=always .network=redes-bgp remote.address=\
    100.100.100.2/32 .as=7711 routing-table=main
add as=20011 disabled=no local.role=ebgp name=CLIENTE-V4 \
    output.default-originate=always .network=redes-bgp remote.address=\
    200.10.3.2/32 .as=5050 routing-table=main
/system identity
set name=001-VIVO
/system note
set show-at-login=no
/tool romon
set enabled=yes
